IsDialogEvent
returns Is this event related to a modeless dialog?
any currently-open modeless dialogs. If the return value is TRUE, the next theEvent is the address of an EventRecord. Normally, this will contain the data obtained by a call to GetNextEvent in your main event loop. Returns: a Boolean value indicating whether the event occurred in a modeless dialog window. It is one of:
FALSE (0) theEvent is unrelated to dialogs which dialog and to handle the event.
Notes: You should call IsDialogEvent in your main event loop if you have opened this if all such dialogs are closed or haven't yet been opened - it just
The return value is TRUE if theEvent is an "activate" or " update" event for any dialog window. If the active window is a dialog, the return value is
TRUE for all mouse-downs in its content region and all other events related to the window.
In most cases, the next step is to call DialogSelect to see which dialog is associated with theEvent and to handle the event. However, that function
doesn't handle -shifted keys or disk-insert events. Thus, you may need to
do some preprocessing of theEvent beforehand.
If all your dialogs are modal, events are handled immediately after the
dialog is displayed by a loop that calls ModalDialog and you won't need this function.
ensures correct blinking of the caret for editText items.
DAs: This call checks the windowKind field of the relevant WindowRecord, looking for a 2 ( dialogKind). Since DAs must set their reference number in this field, you must store 2 into dialog window's
windowKind field, call IsDialogEvent, and restore the value afterwards.